Although taxis are available, you will probably want to walk through Stone Town. After all, most of the alleys are barely wide enough for a bike to pass.
Journeying outside Stone Town is most comfortably done with a taxi or a private car, however a network of dalla-dallas, small minivans, exist which service all the major villages on the island. The adventurous, armed with a phrase book and map, will experience a wonderful side of Zanzibar life, which all too often is just another photograph to the typical tourist zooming past. A private car is of course a lot more expensive than a dalla-dalla, $15 compared to $3. It will take you about 2 hours to get to Nungwi, on the northern tip of the island.Another problem to take in account when driving by yourself is the Police and their practice of inventing "offences" to get bribes. Normally, they often threaten to go to trial in a couple of days, sometimes jumping in your car on the grounds that you have to drive them to the police station. Then, when they state "How can we sort this out?" 5000 Tsh $3 will be enough to forget the offence.
Many hotels are happy to arrange a taxi for a transfer to the harbor, airport, spice tour or to another hotel. Beware, however, as they get commissions from taxis and so the prices tend to be higher. For example, your hotel might say that an airport transfer is $10, while out on the streets of Stone Town there are so many taxi drivers needing business you'll probably be able to negotiate the price down to $6.
Avoid street hawkers and sellers by ignoring them completely. Do not even say hello or make eye contact. It is the most efficient way of getting rid of them, some may be dangerous. If they try to sell you a tour, you may never see him or her again. Book from an office, and make sure to state that you walked in without help from anyone.